package com.aecc.api.controller;

import java.util.HashMap;
import java.util.Map;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.aecc.api.apivalid.RequestCheck;
import com.aecc.api.base.BaseController;
import com.aecc.api.model.RequestModel;
import com.aecc.api.model.ResultModel;

@RestController
@RequestMapping("/api/towercrange")
public class TowerCraneController extends BaseController {
	
	/**
	 * 塔吊设备信息上报接口
	 * @return
	 */
	@PostMapping("/deviceInfo")
	@RequestCheck()
	public ResponseEntity<ResultModel> deviceInfo(@RequestBody RequestModel arg) {
		// 业务处理
		return this.Resp200(ResultModel.success());
	}
	
	/**
	 * 塔吊实时监测记录上报接口
	 * @return
	 */
	@PostMapping("/record")
	@RequestCheck()
	public ResponseEntity<ResultModel> record(@RequestBody RequestModel arg) {
		// 业务处理
		Map<String, Object> res = new HashMap<>();
		res.put("frequency", -1);
		return this.Resp200(ResultModel.success(res));
	}
	
	/**
	 * 塔吊报警记录上报接口
	 * @param arg
	 * @return
	 */
	@PostMapping("/warn")
	@RequestCheck()
	public ResponseEntity<ResultModel> warn(@RequestBody RequestModel arg) {
		// 业务处理
		return this.Resp200(ResultModel.success());
	}
}
